package com.xdb.sqlparser.dialect.oracle.ast.statement;

import java.util.ArrayList;
import java.util.List;

import com.xdb.sqlparser.ast.SQLHint;
import com.xdb.sqlparser.ast.statement.SQLInsertStatement;
import com.xdb.sqlparser.dialect.oracle.ast.clause.OracleErrorLoggingClause;
import com.xdb.sqlparser.dialect.oracle.ast.clause.OracleReturningClause;
import com.xdb.sqlparser.dialect.oracle.visitor.OracleASTVisitor;
import com.xdb.sqlparser.visitor.SQLAstVisitor;

public class OracleInsertStatement extends SQLInsertStatement implements OracleStatement {

	private OracleReturningClause returning;
	private OracleErrorLoggingClause errorLogging;
	private List<SQLHint> hints = new ArrayList<SQLHint>();

	public List<SQLHint> getHints() {
		return hints;
	}

	public void setHints(List<SQLHint> hints) {
		this.hints = hints;
	}

	public OracleReturningClause getReturning() {
		return returning;
	}

	public void setReturning(OracleReturningClause returning) {
		this.returning = returning;
	}

	public OracleErrorLoggingClause getErrorLogging() {
		return errorLogging;
	}

	public void setErrorLogging(OracleErrorLoggingClause errorLogging) {
		this.errorLogging = errorLogging;
	}

	@Override
	protected void accept0(SQLAstVisitor visitor) {
		this.accept0((OracleASTVisitor) visitor);
	}

	public void accept0(OracleASTVisitor visitor) {
		if (visitor.visit(this)) {
			this.acceptChild(visitor, tableSource);
			this.acceptChild(visitor, columns);
			this.acceptChild(visitor, values);
			this.acceptChild(visitor, query);
			this.acceptChild(visitor, returning);
			this.acceptChild(visitor, errorLogging);
		}

		visitor.endVisit(this);
	}
}
